package com.vhall.component.controller.export.facade;

import com.vhall.component.entity.data.vo.DataExportParamVO;
import com.vhall.component.entity.data.vo.DataExportRspVO;
import com.vhall.component.entity.export.ExportEntity;
import com.vhall.component.entity.export.vo.ExportListReqVO;
import com.vhall.component.entity.export.vo.ExportListRspVO;
import com.vhall.component.entity.export.vo.ExportPage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author guoxin.wang
 * @date 2021/06/15 13:45
 */
@FeignClient(value = "ExportFacade", path = "/v4/export")
public interface ExportFacade {

    /**
     * 导出列表
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @PostMapping("/export-list")
    ExportPage<ExportListRspVO> exportList(@Validated ExportListReqVO reqVO);

    /**
     * 插入数据
     *
     * @param ee 参数
     * @return 返回值
     */
    @PostMapping(value = "/create")
    Boolean createExport(@Validated @RequestBody ExportEntity ee);

    /**
     * 下载模板
     *
     * @throws Exception 异常信息
     */
    @GetMapping(value = "/white-account-template")
    void whiteAccountTemplate() throws Exception;

    /**
     * getAllInfo
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @GetMapping(value = "/stat-all-info")
    List<DataExportRspVO> getAllInfo(@Validated DataExportParamVO reqVO);

    /**
     * getAllInfoNum
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @GetMapping(value = "/stat-all-num")
    Integer getAllInfoNum(@Validated DataExportParamVO reqVO);

    /**
     * lotteryTemplate
     *
     * @throws Exception 异常信息
     */
    @GetMapping(value = "/lottery-user-template")
    void lotteryTemplate() throws Exception;

    /**
     * filterTemplate
     *
     * @throws Exception 异常信息
     */
    @GetMapping(value = "/filter-words-template")
    void filterTemplate() throws Exception;

    /**
     * 获取导出文件名称
     *
     * @param roomName       房间名称
     * @param type           导出类型
     * @param exportTypeName 特殊导出类型名称
     * @return
     */
    @GetMapping(value = "/get-fileName")
    String getFileName(@RequestParam("roomName") String roomName, @RequestParam("type") Integer type, @RequestParam("exportTypeName") String exportTypeName);

}
